import lib.system.SWFAddress;

var contextPath:String;

// SWFAddress handling
SWFAddress.setStrict(false);
SWFAddress.onChange = function() 
{
	var value = SWFAddress.getValue();
	var path = SWFAddress.getPath();
	var id = SWFAddress.getParameter("id");

	// mlf.gatekeeper.native.Caller.MLoader("app/"+value+".xml");
	cacheDeepLinkingChange(value);

	SWFAddress.setTitle("Jumpingnotes / "+value);
}

function setDeepLinkingValue(val:String)
{
	SWFAddress.setValue(val);
}

function cacheDeepLinkingChange(changeContext:String)
{
	contextPath=changeContext;
}

function triggerDeepLinkingChange(slot)
{
	if (contextPath==null) return;

	mlf.mcmanager.SMCManager.popInstance(slot);
	mlf.gatekeeper.native.Caller.MLoader("app/"+contextPath+".xml");
	contextPath=null;
}